package com.moke.util.base
{

	import flash.display.*;

	/**
	 * 显示帮助类
	 * @author moke
	 */ 
	public class DisplayObjectUtilities
	{

		public static function removeAllChildren(container:DisplayObjectContainer):void
		{
			if (container != null)
			{
				var count:int = container.numChildren;
				for (var i:int = 0; i < count; i++)
				{
					container.removeChildAt(0);
				}
			}
		}
		
		public static function removeFromParent(displayObject:DisplayObject):void
		{
			if(displayObject.parent != null)
			{
				displayObject.parent.removeChild(displayObject) ;
			}
		}
	}
}
